The present invention relates to instruments that analyze chemical properties of a specimen using optical means. More specifically, the invention is an improvement to already developed techniques for controlling a laser or other narrow-band light source in such instruments.